PUBLISH_C=publish_client.cpp
CONSUME_C=consume_client.cpp
CFLAGS=-I../third/include
LFLAGS=-L../third/lib -lprotobuf -pthread -lmuduo_net -lmuduo_base -lz
FILES=../common/mq_msg/mq_msg.pb.cc ../common/mq_proto/mq_proto.pb.cc ../third/include/muduo/proto/codec.cc

all: publish_client consume_client

publish_client: $(PUBLISH_C) $(FILES)
	g++ $(CFLAGS) $^ -o $@ -std=c++14 $(LFLAGS) -g

consume_client: $(CONSUME_C) $(FILES)
	g++ $(CFLAGS) $^ -o $@ -std=c++14 $(LFLAGS) -g


.PHONY:clean cm
clean:
	@rm -f publish_client consume_client
cm:
	make clean; make